package com.gugee.ins.web.repository;

import com.gugee.ins.web.model.mysql.InsRkBloggerFlMonth;
import org.springframework.data.jdbc.repository.query.Query;
import org.springframework.data.repository.CrudRepository;

public interface InsRkBloggerFlMonthRepository extends CrudRepository<InsRkBloggerFlMonth,Long>, InsRkBloggerFlMonthExtRepository {

    @Query("SELECT distinct IFNULL(max(create_time),0) FROM `ins_rk_blogger_fl_month` where category_name = :category and nation = :nation")
    long getMaxCreateTime(String category,String nation);

    @Query("SELECT distinct IFNULL(max(datecode),0) FROM `ins_rk_blogger_fl_month` where category_name = :category and nation = :nation")
    int getMxDateCode(String category,String nation);


}
